package com.itheima.tlias84.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


/**
 * @JsonIgnore  加在属性上springboot 对象转Json的时候自动忽略掉该值
 * @JsonIgnoreProperties 加在类上，指定多个需要忽略掉转Json的属性，值就填属性名就行
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//@JsonIgnoreProperties({"id","updateTime"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SelectAllDeptDTO {
    private int id;
    public String name;
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss")
    private LocalDateTime updateTime;
}
